<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>用户管理</title>
    <jsp:include page="../../body/link-page.jsp" flush="true"/>

</head>
<body>
<div class="panel">
        <div class="panel-body">
            <div id="demo-dt-addrow_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                <table id="table" class="table table-striped table-bordered dataTable no-footer dtr-inline" cellspacing="0" width="100%" role="grid" aria-describedby="demo-dt-addrow_info" style="width: 100%;" data-pn="${page.pageNum}" data-ps="${page.pageSize}" data-tp="${page.totalPage}" data-tr="${page.totalRecord}">
                    <tbody>
                        <div class="gallery" id="links">
                            <c:forEach items="${pictureList.results}" var="picture">
                                        <img src="${picture.picUrl}" alt="${picture.name}" id="${picture.id}" class="gallery-item"  style="max-width: 250px; height:200px;" onDblClick="chooseImg(this)">
                            </c:forEach>
                        </div>
                    </tbody>
                </table>
            </div>
            <ul class="pagination" style="width: 100%"></ul>
        </div>
</div>
</body>
<jsp:include page="../../body/javascript-page.jsp" flush="true"/>
<script>
    function  chooseImg(picture) {
        parent.$(".img-zone").val(picture.id);
        var imgDiv= parent.$("#layui-upload-zone");
        imgDiv.empty();
        var img=document.createElement("img");
        img.className="img-zoneLot";
        img.src=picture.src;
        img.setAttribute("max-width","100%");
        img.setAttribute("height","100%");
        img.onerror="${basePath}/static/img/head/default-head.jpg";
        imgDiv[0].appendChild(img);
        imgDiv.css("border-color" ,"#FFFAFA");
        imgDiv.css("background-color" ,"#FFFAFA");
        parent.layer.closeAll('iframe');
    }

</script>
</html>
